package homework_five_2;

public class SalesEmployee extends ColEmployee {
    private double sale;
    private double ratio;

    public SalesEmployee(String name, int birthdaymonth, double sale, double ratio) {
        super(name, birthdaymonth);
        this.sale = sale;
        this.ratio = ratio;
    }

    public double getSalary(int month) {
        double salary;
        salary = sale * ratio;
        if (getBirthdaymonth() == month) {
            salary += 100;
        }
        return salary;

    }

    public double getRatio() {
        return ratio;
    }

    public void setRatio(double ratio) {
        this.ratio = ratio;
    }

    public double getSale() {
        return sale;
    }

    public void setSale(double sale) {
        this.sale = sale;
    }

    public String getJob() {
        return "SalesEmployee ";
    }
}
